package com.java.oop;

public class MethodTest {
    public void test() {
        System.out.println("这是无参的test方法");
    }

    public void test(int n1){
        System.out.println("这是有int参数的test方法");
    }

    public void test(int n1, int n2){
        System.out.println("这是有int两个参数的test方法");
    }

    public void test(String s1){
        System.out.println("这是有String参数的test方法");
    }

    public static void main(String[] args) {
        MethodTest method = new MethodTest();
        method.test(1);
        method.test(1,2);
        method.test("hello");
        method.test();
    }

}
